<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            height: 100%;
            width: 100%;
            margin: 0;
            padding: 0;
        }
</style>
</head>
<body>
    <!-- 有bug不行! -->
    <!-- <div class="dialong" style="width: 100%; height: 100%;background-color: black; opacity: 0.3;">
    <div class="content" style="width: 200px; height: 200px; background-color: red;"></div>
    </div> -->
    <!-- 弹窗,想到给父盒子设置一个背景颜色为rgba(),子盒子的颜色才不会被影响 -->
    <div class="dialong" style="width: 100%; height: 100%;background-color: rgba(0,0,0,0.3);">
        <div class="content" style="width: 200px; height: 200px; background-color: white;"></div>
    </div>
</body>
</html>